package com.edu.lighthouse.web;

import com.edu.lighthouse.conf.Result;
import com.edu.lighthouse.pojo.vo.PayBaseVo;
import com.edu.lighthouse.pojo.vo.PayRegVo;
import com.edu.lighthouse.service.PayService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

/**
 * @author wufengfu
 */
@RestController
@RequestMapping("/api/v1/pay")
public class PayController {
    @Autowired
    PayService payService;

    private Logger log = LoggerFactory.getLogger(PayController.class);

    @PostMapping("/list")
    public Result listLarge(@RequestBody PayBaseVo payBaseVo) {
        log.info("支付列表, payBaseVo={}", payBaseVo);
        List<PayRegVo> list = payService.list(payBaseVo);
        return Result.success(list);
    }
}
